<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:import href="commun.xsl"/>
	<xsl:import href="template_name.xsl"/>
	<!-- template js -->
	<xsl:template name="js.module.sheet">
		<script type="text/javascript" src="application/js/fluxEdition.js" charset="iso-8859-1">&#160;</script>
	</xsl:template>
	<!-- template principal -->
	<xsl:template name="Contenu">
		<br/>
		<a href="index.php?page=FLUX_L">
			<xsl:value-of select="$LBL.RETOURALALISTE"/>
		</a>
		<center>
			<br/>
			<br/>
			<xsl:if test="1=0">
				<xsl:attribute name="onload">document.location.href='index.php&amp;page=FLUX_L';</xsl:attribute>
			</xsl:if>
			<xsl:choose>
				<xsl:when test="/root/data/Flux">
					<xsl:call-template name="Flux">
						<xsl:with-param name="flux" select="/root/data/Flux"/>
					</xsl:call-template>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="Flux"/>
				</xsl:otherwise>
			</xsl:choose>
		</center>
	</xsl:template>
	<xsl:template name="Flux">
		<xsl:param name="flux" select="''"/>
		<form method="POST" onsubmit="return validForm(this)&amp;&amp;validFlux(this);">
			<xsl:choose>
				<xsl:when test="$flux=''">
					<xsl:attribute name="action">index.php?page=FLUX_M&amp;cinematic=create;display</xsl:attribute>
				</xsl:when>
				<xsl:otherwise>
					<xsl:attribute name="action">index.php?page=FLUX_M&amp;cinematic=update;display</xsl:attribute>
				</xsl:otherwise>
			</xsl:choose>
			<input type="hidden" name="action" value="{mode}"/>
			<input type="hidden" name="fluxId" value="{$flux/fluxId}"/>
			<table class="formulaire">
				<tr>
					<th>
						<xsl:value-of select="$LBL.FLUX"/>
					</th>
					<td>
						<input type="text" name="flux" id="flux" value="{$flux/flux}" class="obligatoire"/>
					</td>
				</tr>
				<tr>
					<th>
						<xsl:value-of select="$LBL.DESCRIPTION"/>
					</th>
					<td>
						<input type="text" name="description" id="description" value="{$flux/description}"/>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.MODEDEPAIEMENTDEF"/>
					</th>
					<td>
						<xsl:call-template name="ModifSelect">
							<xsl:with-param name="value" select="$flux/modePaiementId"/>
							<xsl:with-param name="Node" select="/root/paramFlow/MODPAI"/>
							<xsl:with-param name="nom" select="'modePaiementId'"/>
							<xsl:with-param name="defaultValue" select="''"/>
							<xsl:with-param name="defaultDisplay" select="''"/>
							<xsl:with-param name="class" select="'obligatoire'"/>
							<xsl:with-param name="optionVide" select="'O'"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.COMPTEPRINCIPAL"/>
					</th>
					<td>
						<xsl:call-template name="ListeComptes">
							<xsl:with-param name="valeur" select="$flux/compteId"/>
							<xsl:with-param name="champs" select="'compteId'"/>
							<xsl:with-param name="listeComptes" select="/root/data/ListeComptes"/>
							<xsl:with-param name="class" select="'obligatoire'"/>
							<xsl:with-param name="valeurVide" select="'O'"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.COMPTEDESTINATION"/>
					</th>
					<td>
						<xsl:call-template name="ListeComptes">
							<xsl:with-param name="valeur" select="$flux/compteDest"/>
							<xsl:with-param name="champs" select="'compteDest'"/>
							<xsl:with-param name="listeComptes" select="/root/data/ListeComptes"/>
							<xsl:with-param name="valeurVide" select="'O'"/>
						</xsl:call-template>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.ENTREEEPARGNE"/>
					</th>
					<td>
						<input type="checkbox" name="entreeEpargne" value="" checked="{entreeEpargne}"/>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.SORTIEEPARGNE"/>
					</th>
					<td>
						<input type="checkbox" name="sortieEpargne" value="" checked="{sortieEpargne}"/>
					</td>
				</tr>
				<tr>
					<th style="width: 266px;">
						<xsl:value-of select="$LBL.DEPENSE"/>
					</th>
					<td>
						<input type="checkbox" name="depense" id="depense" value="checked" checked="{depense}"/>
					</td>
				</tr>
			</table>
			<table>
				<tr align="center">
					<td colspan="2" rowspan="1">
						<input type="submit" class="bouton" name="valider" value="Valider"/>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>
</xsl:stylesheet>
